<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

  <head>
   	<%@ include file="/page/commen/common.jsp" %>
   <script>
$(function () {

    $("#btnGetIP").click(function () {
        var jqxhr = $.getJSON("http://jsonip.appspot.com?callback=?",
            function (data) {
                alert(data.ip);
            })
        .error(function () { alert("error"); })
    });
});
   </script>	
   		<script type="text/javascript">
 
       function search(){
       var keyword=$("#searchInput").val();
       if(keyword!=""){
           $("#showAnswer").html("<p class='findAnswerWait'><br/>平台智能分析答案中，请稍等...</p>");
          $.ajax({
                url: 'doSearchAnswerMain.do',
                type: 'POST',
                data: {
                keyword:keyword
                   },
                error: function(xhr) {
                 $("#showAnswer").html("平台没有返回数据，可能服务器忙，请重试");
                },
               success: function(response) {
               $("#showAnswer").html(response);
               },
               failure: function(response,opts){
				  var obj = Ext.decode(response.responseText);
				  var ktitle = RstrResplace(obj.ktitle);
				   $("#showAnswer").html(obj.ktitle); 
			  }
            });
          }else{
          $("#showAnswer").html("请输入问题,例如：谁发明电灯?"); 
          }
       }
 		  $(document).ready(function(){
          setMenu("yanshi");//设置菜单显示选中项
         });
   		//显示
     document.onkeydown = function(e){  
               keyDown(e);//需要获取值的输入控件ID  
               }; 
      function keyDown(e) {  
	       var currKey=0,e=e||event;  
	       currKey=e.keyCode||e.which||e.charCode;
	       if(currKey==13){
	         search();
	       } 
       }
   		</script>
    <title>在线演示</title>
  </head>
  
  <body class="ContentBody">
  	<%@ include file="/page/commen/top.jsp" %>
		<div class="left" style="height:300px">	
		 <p class="description showImg">在线演示</p>
	<div class="searchDiv"> 
			 <table><tr><td>
			 <input type="text" class="inputbox" id="searchInput"/> 
		</td>
		<td>
		 <input type="button" class="btn" onclick="search()"/>
		</td>
		</tr>
		</table>
	
    </div>
	<div class="searchAnswerDiv">	
	 <p id="showAnswer" class="showAnswer">

	 </p>
    </div>

	
        
  </div>
  
  	<div id="right">
	<%@ include file="/page/commen/login.jsp" %>	
	<%@ include file="/page/commen/download.jsp" %>	
			
	<%@ include file="/page/commen/contactUs.jsp" %>
		</div>	
	<%@ include file="/page/commen/foot.jsp" %>	
  </body>
</html>
